.class public Lcom/waiqin365/lightapp/dailyreport/view/cm;
.super Landroid/widget/BaseAdapter;


# instance fields
.field public a:Ljava/util/List;

.field b:Z

.field public c:I

.field private d:Landroid/content/Context;

.field private e:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->b:Z

    const/4 v0, -0x1

    iput v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->c:I

    iput-object p1, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->d:Landroid/content/Context;

    iput-object p2, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public a(I)Lcom/waiqin365/lightapp/dailyreport/c/b;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/dailyreport/c/b;

    :goto_0
    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public a()V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    iget v1, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->c:I

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    const/4 v0, -0x1

    iput v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->c:I

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/dailyreport/view/cm;->notifyDataSetChanged()V

    return-void
.end method

.method public a(Lcom/waiqin365/lightapp/dailyreport/c/b;)V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    const/4 v1, 0x0

    invoke-interface {v0, v1, p1}, Ljava/util/List;->add(ILjava/lang/Object;)V

    return-void
.end method

.method public a(Z)V
    .locals 0

    iput-boolean p1, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->b:Z

    return-void
.end method

.method public b(I)V
    .locals 0

    iput p1, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->c:I

    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    goto :goto_0
.end method

.method public synthetic getItem(I)Ljava/lang/Object;
    .locals 1

    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a(I)Lcom/waiqin365/lightapp/dailyreport/c/b;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 3

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->d:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0300f6

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    const v0, 0x7f0c05ca

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->e:Landroid/widget/TextView;

    invoke-virtual {p0, p1}, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a(I)Lcom/waiqin365/lightapp/dailyreport/c/b;

    move-result-object v0

    iget-object v2, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->e:Landroid/widget/TextView;

    iget-object v0, v0, Lcom/waiqin365/lightapp/dailyreport/c/b;->b:Ljava/lang/String;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-boolean v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->b:Z

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-ne p1, v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->e:Landroid/widget/TextView;

    const-string/jumbo v2, ""

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    iget v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->c:I

    if-ne v0, p1, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->e:Landroid/widget/TextView;

    const-string/jumbo v2, ""

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/view/cm;->e:Landroid/widget/TextView;

    const/16 v2, 0x8

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

    :cond_1
    return-object v1
.end method
